﻿using AIO.Entity.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AIO.Entity
{
    /// 设备管理
    [Table("BE01")]
    public class Equip : BaseEntity
    {
        /// <summary>
        /// 设备名
        /// </summary>
        [Required]
        [Column("BE001"), MaxLength(100)]
        public string? Name { get; set; }

        /// <summary>
        /// 设备样式
        /// </summary>
        [Required]
        [Column("BE002"), MaxLength(50)]
        public string? Style { get; set; }

        /// <summary>
        /// 设备数量
        /// </summary>
        [Required]
        [Column("BE003"), MaxLength(50)]
        public string? Number { get; set; }

        /// <summary>
        /// 采购价格
        /// </summary>
        [Required]
        [Column("BE004"), MaxLength(50)]
        public string? Price { get; set; }

        /// <summary>
        /// 采购日期
        /// </summary>
        
        [Column("BE005")]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}"
            , ApplyFormatInEditMode = true)]
        public DateTime? PurchaseDate { get; set; }

        /// <summary>
        /// 报废日期
        /// </summary>
       
        [Column("BE006")]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}"
            , ApplyFormatInEditMode = true)]
        public DateTime? ScrapDate { get; set; }

        public Department? Department { get; set; }

    }
}
